package com.tizona.entity;

import java.math.BigDecimal;
import java.util.Set;
import java.util.HashSet;
import java.util.LinkedHashSet;

/**
 * Created by Vitaliy Kim.
 * Date: 28.08.2005
 * Time: 20:00:47
 */
public class TrafficSplit {
    /** identifier field */
    private BigDecimal TId;

    /** persistent field */
    private Long upload = new Long(0);

    /** persistent field */
    private Long download = new Long(0);

    /** persistent field */
    private Long channel;

    /** persistent field */
    private Split sessionSplit;

    /** persistent field */
    private Set<Chunk> chunks = new LinkedHashSet<Chunk>();

    public Long getChannel() {
        return channel;
    }

    public void setChannel(Long channel) {
        this.channel = channel;
    }

    public TrafficSplit(BigDecimal TId, Long upload, Long download, Long channel, Split sessionSplit) {
        this.TId = TId;
        this.upload = upload;
        this.download = download;
        this.channel = channel;
        this.sessionSplit = sessionSplit;
    }

    public TrafficSplit(Split sessionSplit, Long channel) {
        this.sessionSplit = sessionSplit;
        this.channel = channel;
    }

    public TrafficSplit(Split sessionSplit) {
        this.sessionSplit = sessionSplit;
    }

    public BigDecimal getTId() {
        return TId;
    }

    public void setTId(BigDecimal TId) {
        this.TId = TId;
    }

    public Long getUpload() {
        return upload;
    }

    public void setUpload(Long upload) {
        this.upload = upload;
    }

    public void addUpload(Long upload) {
        this.upload += upload;
    }

    public Long getDownload() {
        return download;
    }

    public void setDownload(Long download) {
        this.download = download;
    }

    public void addDownload(Long download) {
        this.download += download;
    }

    public Split getSessionSplit() {
        return sessionSplit;
    }

    public void setSessionSplit(Split sessionSplit) {
        this.sessionSplit = sessionSplit;
    }

    public Set<Chunk> getChunks() {
        return chunks;
    }

    public void setChunks(Set<Chunk> chunks) {
        this.chunks = chunks;
    }
}
